import {Toast} from 'antd-mobile'
// 此处配置 根访问路径 以及 全局错误处理
// 更多配置请根据业务逻辑自行实现

// 后端 API 地址，最好以 http(s):// 打头
export const localMock = false;



//export const devUrl = 'http://yunbanktest.bankcomm.com/hpbc';
//export const imgUrl = 'http://yunbanktest.bankcomm.com/hpbc/';
//export const imgUrl = 'http://yunbanktest.bankcomm.com/hpbc_uat_web/';
//export const devUrl = 'http://yunbanktest.bankcomm.com/hpbc_uat_web';
//uat的publicKey
//export const passKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAun18tEhih1tfiqIqFYarozj/RYvg7fz3rfDsc5ylZkfmVKRSzex1eHQqkRcD2Snt4C6mVrpL8eht4+EuLCR4xXNrZNTjr0KwOj+BaFMqAdq4UAj58SvVhAse968MBqp2XDpWIyUtrsD3dmL6Mengy7wAASYhh5kDDuGmX7+mPgaT/yuTPdhG3UZFQjQrpC5IW6NTB8lVpJ7x0AgyLc/6RF40uNAuKDZ3zu5FB/EAEss8aYAP1vHO0wal//yKunZoxh68FOU98JB6rUNqnuMAMyyR3znURh303n2glHfgXzOOo+iXWQJyV1v0uiz5biTNrr40SIILIkwcQip3Nu5oowIDAQAB';


//生产环境

export const devUrl = 'https://healthybocom-gelue.bankcomm.com/hpbc';
export const imgUrl = 'https://healthybocom-gelue.bankcomm.com/hpbc/';
//生产的的publicKey
export const passKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4o1Z2Cra8nXLj7CYYVcPQHyzv4uvSMlSdz8+i63V/LuDDBGyEcxMGAByqJRaiLEmWC3Wt+EB9pKI2gMAI+nAfU4k7iWA66p4ksjNxQDNOPwcHJieRxBmf6AHhgBeGUXfGnagCz1WbhsKGj7wKw8N0ukai9VjtUK3r5juhFXoFnLH4oOoRA7SPFw9pZgJrI418B/ZoD0EHsGw1awxK/PxWJaItvBs/WG63fUUTubwqUCRQXJcVXsxUINxD3qEUwYAChnTUj/x8OaNprSrmelGXMOuyEnYpbV3op2BOVJRjwnCX4kwIoBddw4uMvCcBRvQckwHFPGVH8kSiHjnzgTuSwIDAQAB';


export const errHandler = e => {
  if (e && e.ERROR_MESSAGE&&e.ERROR_CODE!='JUMPSC0006'&&e.ERROR_CODE!='JKJH0004SC0006') {
    //Toast.fail(e.ERROR_MESSAGE)
  } else {
    //alert('[ XHR:Failed ] 详情请看控制台');
  }
  //console.error(e);
};

//记录一下本地存储的key值
export const localStorageKey = [
	//首页
	'localName',//md5加密过后的memberId
	
	'localName_thirdMenuBatch',//员工家园第三方接口批次号
	
	'batch',//Banner接口批次号
	'orgList',
	'index',
	'version',
	'url',//go.png
	'userAuthToken',
	
	'detailId',//首页资讯跳转时的id home news collect
	'isBranchMember',//news
	
	'thirdMenuBatch',//可作为积分乐园的批次号  integral
	
	'localName_savePress',//压力值 presstest
	
	'dimId_memberId',//用户某纬度答题情况  question
	
	'oneDimScore',//单纬度分值 question
	//'localReportName',//报告详情 reportDetail
	'currLang',//语言 question
	//'testDuringTime',//测评时间 happyIndex
	'itemDetail',//honorMedal
	'phoneValue',//手机号 my
	'emailValue',//邮箱号 my
	'bannerImgPath',//banner 图片名称集合
	'thirdMenu'//第三方   图片名称集合
]



/*//获取线上更新地址
let type = phoneSystem();
mineService.compareVersions(type).then((res)=>{
	console.log(res)
    //code为1  有新版本，有返回url(更新地址)；
    if(res['code']==1 && res['url']){
    	native.call({
        	'fun':'updateAPP',
        	'param':{
        		'msg':'您有新版本可以更新，是否更新?'
        		//,'downloadUrl': res['url']
        	}
    	})
    }
    	
   
})*/

